/**
 *Project: jh-framework
 *File: cn.xkshow.demo.action.UinfoAction.java 
 *Author: hardy(admin@xkshow.cn) Copyright
 ****************************************************************
 *   VERSION       DATE            BY       CHANGE/COMMENT
 * --------------------------------------------------------------
 *    1.0        2013-7-12         hardy         create
 ****************************************************************
 *note:
 ***************************************************************/ 
package cn.xkshow.demo.web;

import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.couchbase.client.CouchbaseClient;
import com.opensymphony.xwork2.ModelDriven;

import cn.xkshow.cache.couchbase.CouchBaseHandle;
import cn.xkshow.demo.po.Uinfo;
import cn.xkshow.framework.service.UniversalService;
import cn.xkshow.framework.web.action.BaseMainAction;
import cn.xkshow.framework.web.action.UniversalAmAction;

public class UinfoAction extends UniversalAmAction<Uinfo>  {	
	
	UinfoAction(){
		super(Uinfo.class);
	}

	public String viewByKey(){
		try {						
			oModel = super.viewByKey("name", keywords);
			this.addActionMessage("SUCCESS: "+ oModel.toString());
		} catch (Exception e) {
			// TODO: handle exception
			this.logger.error(e);
			this.addActionError(this.getText("msg.action.loading.search.fail"));
		}		
		return VIEW;
	}
	
	@Override
	public String search(){
		try {						
			super.findPageList(true, "from Uinfo", null, 100, null);
		} catch (Exception e) {
			// TODO: handle exception
			this.logger.error(e);
			this.addActionError(this.getText("msg.action.loading.search.fail"));
		}		
		return SEARCH;
	}
	
	public String mytile(){
		return "mytile";
	}
}
